Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added filters page and link from how-tos #158

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

vickytnz
Copy link
Contributor

@vickytnz vickytnz commented Dec 2, 2024

Filters page that:

I have tried running this all locally and it seems to work.

Section in how-tos

section in how-tos

Filters page

page for filters

This page may be running long but i am positioning it for now as a way to understand filters. It could be that this gets split, however I also wonder if this shows that the filters part of the kit needs to get updated to make it in line with the current govuk kit.

Filters page that:
- adapts the govuk prototype kit guidance for using or making filters https://prototype-kit.service.gov.uk/docs/filters and adapts to an earlier version of the kit (particularly for formatting html in filters)
- includes the guidance for dates using xgovuk filters https://prototype-kit.service.gov.uk/docs/date-filters by merging it into the same page

I have tried running this all locally and it seems to work
@vickytnz vickytnz linked an issue Dec 2, 2024 that may be closed by this pull request
@frankieroberto frankieroberto temporarily deployed to nhs-prototyp-98-add-a-g-tmpl26 December 2, 2024 23:17 Inactive
@vickytnz vickytnz requested review from edwardhorsford, frankieroberto and anandamaryon1 and removed request for anandamaryon1 December 2, 2024 23:17
@vickytnz vickytnz marked this pull request as ready for review December 2, 2024 23:18
@vickytnz vickytnz temporarily deployed to nhs-prototyp-98-add-a-g-tmpl26 December 3, 2024 09:36 Inactive
@vickytnz vickytnz temporarily deployed to nhs-prototyp-98-add-a-g-tmpl26 December 3, 2024 12:27 Inactive
@vickytnz
Copy link
Contributor Author

vickytnz commented Dec 3, 2024

How to page with basic information
Filters - change how answers are shown

Simplified page
page with section about other projects

@vickytnz vickytnz self-assigned this Dec 3, 2024
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
@vickytnz vickytnz temporarily deployed to nhs-prototyp-98-add-a-g-tmpl26 December 3, 2024 18:26 Inactive
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
app/views/how-tos/filters.html Outdated Show resolved Hide resolved
@vickytnz
Copy link
Contributor Author

vickytnz commented Dec 4, 2024

Hmm after looking properly at the Nunjucks documentation for filters:

https://mozilla.github.io/nunjucks/api#custom-filters

I wonder if this page should get held back unpublished until we can update the filters page to properly work as documented in the guidance? Or I have to do a disclaimer that the documentation won't work which .... isn't great.

UPDATE: now understand how these connect and have updated guidance.

@vickytnz vickytnz temporarily deployed to nhs-prototyp-98-add-a-g-tmpl26 December 4, 2024 19:10 Inactive
@vickytnz
Copy link
Contributor Author

vickytnz commented Dec 4, 2024

New version:

How-to page

Minor tweak to language
filters- change how text is displayed

Page

Pretty big changes including:

  • adding new example - not sure if this is overdocumented? Have also left it in the old style of filters for now but that can get changed to use arrows if needed
  • note about how to translate the other filters like in the nujucks documentation to this kit - selfishly this is documentation I wish that I had up until now, however part of me is wondering if this should be split into an advanced page. I may have also run out of steam writing the documentation for that.

revised page for filters

@vickytnz vickytnz marked this pull request as draft December 4, 2024 19:54
@vickytnz
Copy link
Contributor Author

vickytnz commented Dec 4, 2024

Arrgh I've realised that the docs kit doesn't have an up-to-date filters page so there is a lot of stuff there that I didn't know was there. Redoing the code examples based on the exact examples that are there.

@vickytnz vickytnz temporarily deployed to nhs-prototyp-98-add-a-g-tmpl26 December 4, 2024 20:26 Inactive
@vickytnz vickytnz temporarily deployed to nhs-prototyp-98-add-a-g-tmpl26 December 4, 2024 20:31 Inactive
@vickytnz
Copy link
Contributor Author

vickytnz commented Dec 4, 2024

New version:

How-to page

Minor tweak to language
filters- change how text is displayed

Page

Now has

  • example from existing file (with note to bring out of comments)
  • example of sentence case filter (do wonder if this should just go in as an example really)
  • note about how to translate the other filters like in the nujucks documentation to this kit - selfishly this is documentation I wish that I had up until now, however part of me is wondering if this should be split into an advanced page. I may have also run out of steam writing the documentation for that.

image

@vickytnz vickytnz marked this pull request as ready for review December 4, 2024 20:33
frankieroberto added a commit to nhsuk/nhsuk-prototype-kit that referenced this pull request Dec 5, 2024
Noticed that the comments in `app/filters.js` mention "gov.uk core
filters" - presumably leftover from forking from the govuk prototype
kit.

Have taken the opportunity to simplify the comments blocks.

The middle comments block could be updated to point to some guidance on
https://prototype-kit.service-manual.nhs.uk when it’s ready.

Spotted when reviewing
nhsuk/nhsuk.service-manual.prototype-kit.docs#158
@frankieroberto frankieroberto temporarily deployed to nhs-prototyp-98-add-a-g-wvkzg0 December 10, 2024 21:47 Inactive
@sarawilcox
Copy link
Contributor

Hi @vickytnz, re the page about filters. It feels very complex to me. I'm wondering whether we should have a basic usage section and an advanced usage section as GOV does: https://prototype-kit.service.gov.uk/docs/tutorials-and-guides. Perhaps with branching being advanced too? Did you consider this?

If we do keep it in for advanced users, I suspect that we need to explain in more detail what "filters" are here. It's taken me a while to work it out. I was thinking more about filters in the sense of filtering a list.

I can do a content review next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a guide for how to use (and add?) filters
4 participants